<script>
	import unis from '@/utils/util.js'
	export default {
		onLaunch: function() {
			console.log('App Launch')
		},
		onShow: function() {
			
			unis.getData('/api/member/message/unread', 'get', {
			}, function (res) {
				if(res.code == 200){
					if(res.data.message_count > 0){
						var num = res.data.message_count.toString()
						uni.setTabBarBadge({
						  index: 1,
						  text: num
						})
					}
				}
			});
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">

.content{
	background: #F9FAFB;
	min-height: 100vh;
}
	.d-f {
	  display: flex;
	  align-items: center;
	}
	.j-b {
	  justify-content: space-between;
	}
	.j-a {
	  justify-content: space-around;
	}
	.j-c {
	  justify-content: center;
	}
	.c33 {
	  color: #333;
	}
	.cff {
	  color: #fff;
	}
	.c99 {
	  color: #999999;
	}
	.c66 {
	  color: #666666;
	}
	.c2d{
		color:#2D73FF;
	}
	.c15{
		color: #151313;
	}
	.cfd{
		color: #FD4B37;
	}
	.c76{
		color: #767676;
	}
	.caa{
		color: #aaa;
	}
	.f-w {
	  font-weight: bold;
	}
	.f6 {
	  font-size: 6px;
	}
	.f12 {
	  font-size: 12px;
	}
	.f14 {
	  font-size: 14px;
	}
	.f16 {
	  font-size: 16px;
	}
	.f24 {
	  font-size: 24px;
	}
	.f28 {
	  font-size: 28px;
	}
	.f30 {
	  font-size: 30px;
	}
	.f40 {
	  font-size: 40px;
	}
	.p-r {
	  position: relative;
	}
	.p-a {
	  position: absolute;
	}
	.t-l {
	  text-align: left;
	}
	.ov {
	  overflow: hidden; // 超出的文本隐藏
	  text-overflow: ellipsis; // 溢出用省略号显示
	  white-space: nowrap; // 溢出不换行
	}
	.t-c{
		text-align: center;
	}
	.mt-10{
		margin-top: 10px;
	}
	.pt-10{
		padding-top: 10px;
	}
	.t-r{
		text-align: right;
	}
	.text_content{
		margin-top:20rpx;
		padding-bottom: 30px;
		text-align: center;
	}
	.null{
		image{
			width: 200px;
			display: block;
			padding-top: 100px;
			margin: 0px auto 20px auto;
		}
	}
</style>
